
{% extends "BbcSiteBundle::layout.html.twig" %}

{% block body %}
 {{ parent() }}
 
 <script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">

$(function() {
//-------------- Update Button-----------------


$(".search_button").click(function() {
    var search_word = $("#search_box").val();
    var dataString = 'search_word='+ search_word;
	
	if(search_word=='')
	{
	}
	else
	{
	$.ajax({
	type: "GET",
    url: "{{ path('bbc_site_voir', {'id': 5}) }}",
    data: dataString,
    cache: false,
    beforeSend: function(html) {
   
	document.getElementById("insert_search").innerHTML = ''; 
	$("#flash").show();
	$("#searchword").show();
	 $(".searchword").html(search_word);
	$("#flash").html('<img src="{{ asset('img/ajax-loader.gif') }}" align="absmiddle">&nbsp;Loading Results...');
	
               
            },
  success: function(html){
   $("#insert_search").show();
  
   $("#insert_search").append(html);
   $("#flash").hide();
	
  }
});
		
	}
		

    return false;
	});
//---------------- Delete Button----------------


});
</script>

 

<div align="center">
		<div style="width: 600px">
			<div style="margin-top: 20px; text-align: left">
				<form method="get" action="">
					<input type="text" name="search" id="search_box" class='search_box' />
					<input type="submit" value="Search" class="search_button" /><br />
					<span
						style="color: #666666; font-size: 14px; font-family: Arial, Helvetica, sans-serif;">
				</form>
			</div>
			<div>
				<div id="searchword">
					Search results for <span class="searchword"></span>
				</div>
				<div id="flash"></div>
				<ol id="insert_search" class="update">
				</ol>

			</div>
		</div>
	</div>

{% endblock %}